import request from '@/utils/request'

// 查询工资编报
export function queryUnitSalaryReportPage(query) {
  return request({
    url: '/thirteenSalary/queryUnitSalaryReportPage',
    method: 'get',
    params: query
  })
}
// 查询未添加到单位的人员编报
export function getNotAddPerosn(query) {
  return request({
    url: '/thirteenSalary/getNotAddPerosn',
    method: 'get',
    params: query
  })
}
//添加人员到十三月工资中
export function addThirteenMonth(data) {
  return request({
    url: '/thirteenSalary/addThirteenMonth',
    method: 'post',
    data
  })
}

// 删除十三月工资
export function deletePerson(ids) {
  return request({
    url: '/thirteenSalary/deleteThirteenMonth/' + ids,
    method: 'delete'
  })
}

// 导出
export function outPutSalaryReportList(query) {
  return request({
    url: '/thirteenSalary/outPutSalaryReportList',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

// 导入
export function ImportAsync(data) {
  const config = {
    'Content-Type': 'mutipart/form-data;boundary=' + new Date().getTime()
  }
  return request({
    url: '/thirteenSalary/ImportSalaryReportListAsync',
    type: 'upload',
    method: 'post',
    data,
    config
  })
}
// 查询十三月单位流程状态
export function getThirteenAgencyWorkStatus(query) {
  return request({
    url: '/salaryThirteenWorkFlowController/getThirteenAgencyWorkStatus',
    method: 'get',
    params: query
  })
}

export function generateFormula(agencyId) {
  return request({
    url: '/agencySalaryController/generateFormula',
    method: 'get',
    params: {
      agencyId
    }
  })
}

export function queryReallySendSalarySumAndPersonTotal(agencyId, queryThirteen) {
  return request({
    url: '/agencySalaryController/queryReallySendSalarySumAndPersonTotal',
    method: 'get',
    params: {
      agencyId,
      queryThirteen
    }
  })
}

export function querySubmitReallySendSalarySumAndPersonTotal(query) {
  return request({
    url: '/agencySalaryController/querySubmitReallySendSalarySumAndPersonTotal',
    method: 'get',
    params: query
  })
}

export function queryReallySendSalarySumTotal(params) {
  return request({
    url: '/agencySalaryController/queryReallySendSalarySumAndPersonTotal',
    method: 'get',
    params
  })
}

export function queryColumnName(params) {
  return request({
    url: '/thirteenSalary/queryColumnName',
    method: 'get',
    params
  })
}

export function submitData(data) {
  return request({
    url: '/thirteenSalary/submitUnitSalaryReportData',
    method: 'post',
    data: data
  })
}


export function querySalaryNameDict(params) {
  return request({
    url: '/agencySalaryController/querySalaryName',
    method: 'get',
    params
  })
}

export function queryThirteenChangeCount(params) {
  return request({
    url: '/thirteenSalary/queryThirteenChangeCount',
    method: 'get',
    params
  })
}

export function queryThirteenChangePerson(params) {
  return request({
    url: '/thirteenSalary/queryThirteenChangePerson',
    method: 'get',
    params
  })
}








